<div class="layuimini-container">
    <div class="layuimini-main">
        <div>
            <blockquote class="layui-elem-quote">/{$Request.param.path|default=""}</blockquote>
            {notempty name='$Request.param.path'}
            <button class="layui-btn layui-btn-sm layui-btn-danger" data-request="{:url('delete',['id'=>$Request.param.id,'path'=>$Request.param.path,'type'=>'dir'])}" data-title="确定要删除当前目录吗？" data-end-method="refresh-page">
                删除当前目录
            </button>
            {/notempty}
            <button class="layui-btn layui-btn-sm layui-btn-danger" data-request="{:url('delete',['id'=>$Request.param.id,'path'=>$Request.param.path,'type'=>'clear'])}" data-title="确定要清空当前目录吗？" data-end-method="refresh-page">
                清空当前目录
            </button>
        </div>
        <table class="layui-table">
            <colgroup>
                <col width="150">
                <col width="200">
                <col>
            </colgroup>
            <thead>
                <tr>
                    <th>路径</th>
                    <th>大小</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {notempty name='$Request.param.path'}
                <tr>
                    <td>
                        <a href="{:url('index',['id'=>$Request.param.id,'path'=>$parent_path])}">../</a>
                    </td>
                    <td></td>
                    <td></td>
                </tr>

                {/notempty}
                {volist name='list_content' id='file'}
                <tr>
                    <td>
                        {if $file.type == 'dir' }
                        <a href="{:url('index',['id'=>$Request.param.id,'path'=>$file.path])}" style="white-space: nowrap;">{$file.path}</a>
                        {else /}
                        <a href="{:url('read',['id'=>$Request.param.id,'path'=>$file.path])}" style="white-space: nowrap;">{$file.path}</a>
                        {/if}
                    </td>
                    <td>
                        {notempty name='$file.size'}
                        {:convert_size_readable($file.size)}
                        {/notempty}
                    </td>
                    <td>
                        <div class="layui-btn layui-btn-xs layui-btn-danger" data-request="{:url('delete',['id'=>$Request.param.id,'path'=>$file.path,'type'=>$file.type])}" data-title="确定要删除当前路径吗？" data-end-method="refresh-page">
                            删除
                        </div>
                    </td>
                </tr>
                {/volist}
                {empty name='list_content'}
                    <tr>
                        <td colspan="3">暂无文件</td>
                    </tr>
                {/empty}
            </tbody>
        </table>
    </div>
</div>